package n2393;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	static int N,S;
	
	static int a[][]=new int[10001][2];
	
	static long solve()
	{
		long sum=a[0][0]*a[0][1];
		
		for(int i=1;i<N;i++)
		{
			if(a[i][0]>a[i-1][0]+S)a[i][0]=a[i-1][0]+S;
			sum+=a[i][0]*a[i][1];
		}
		return sum;
	}
	
	
	public static void main(String[] args)  throws Exception{

		BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(bf.readLine());
		N=Integer.parseInt(st.nextToken());
		S=Integer.parseInt(st.nextToken());
		for(int i=0;i<N;i++)
		{
			st=new StringTokenizer(bf.readLine());
			a[i][0]=Integer.parseInt(st.nextToken());
			a[i][1]=Integer.parseInt(st.nextToken());
		}
		System.out.println(solve());
	}

}
